<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var \Magento\Rss\Block\Feeds $block */

?>
<table class="data table rss">
    <caption class="table-caption"><?php echo $block->escapeHtml(__('Feed')); ?></caption>
    <tbody>
        <th colspan="2" scope="col"><?php echo $block->escapeHtml(__('Miscellaneous Feeds')) ?></th>
    <?php foreach ($block->getFeeds() as $feed): ?>
        <?php if (!isset($feed['group'])): ?>
        <tr>
            <td class="col feed"><?php echo $block->escapeHtml($feed['label']) ?></td>
            <td class="col action">
                <a href="<?php echo $block->escapeUrl($feed['link']) ?>" class="action get"><span><?php echo $block->escapeHtml(__('Get Feed')); ?></span></a>
            </td>
        </tr>
        <?php else: ?>
            <th colspan="2" scope="col"><?php echo $block->escapeHtml($feed['group']) ?></th>
            <?php foreach ($feed['feeds'] as $item) :?>
                <tr>
                    <td class="col feed"><?php echo $block->escapeHtml($item['label']) ?></td>
                    <td class="col action">
                        <a href="<?php echo $block->escapeUrl($item['link']) ?>" class="action get"><span><?php echo $block->escapeHtml(__('Get Feed')); ?></span></a>
                    </td>
                </tr>
            <?php endforeach; ?>
        <?php endif; ?>
    <?php endforeach; ?>
    </tbody>
</table>
